package servlets;

import db2.SignDao;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

public class UppaLateTreat extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("UppatientLateTreat in");
        if(req.getParameter("Account")!=null) {
            System.out.println("UppatientLateTreat get Account Yes");
            SignDao signDao=new SignDao();
            if(!signDao.UpSign(req.getParameter("Account"),Integer.parseInt(req.getParameter("indid")))){
                System.out.println("update Sign false");
            }
        } else
            System.out.println("UppatientLateTreat get Account Error");
        resp.sendRedirect("Overnum.jsp");
    }
}
